﻿using AutoMapper;
using System;
using TL_Cloud.Models.BookShop;

namespace TL_Cloud.ViewModels.BookShop
{
    /// <summary>
    /// 年级资源信息
    /// </summary>
    public class BaseGradeResource: BaseGradeUpdateResource
    {
        /// <summary>
        /// 年级编号
        /// </summary>
        public string GradeId { get; set; }
     
    }
    /// <summary>
    /// 年级基础信息
    /// </summary>
    public class BaseGradeBasicResource
    {
        /// <summary>
        /// 年级名称
        /// </summary>
        public string GradeName { get; set; }
        /// <summary>
        /// 排序编号
        /// </summary>
        public int? Sort { get; set; }
      
    }
    /// <summary>
    /// 年级增加信息
    /// </summary>
    public class BaseGradeAddResource: BaseGradeBasicResource
    {
        
    }
    /// <summary>
    /// 年级修改信息
    /// </summary>
    public class BaseGradeUpdateResource: BaseGradeBasicResource
    {
        /// <summary>
        /// 是否启用
        /// </summary>
        public int? EnabledMark { get; set; }
    }

    public class BaseGradeMappingProfile : Profile
    {
        public BaseGradeMappingProfile()
        {
            CreateMap<Base_GradeInfo, BaseGradeResource>(); 
            CreateMap<BaseGradeResource, Base_GradeInfo>();

            CreateMap<BaseGradeAddResource, Base_GradeInfo>();
            CreateMap<BaseGradeUpdateResource, Base_GradeInfo>();
            
        }
    }
}
